package avishay.balderman.dao;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Link
{
	public Link()
	{
		
	}

	public String getDescription()
	{
		return description;
	}

	public void setDescription(String description)
	{
		this.description = description;
	}
	
	public String getUrl()
	{
		return url;
	}

	public void setUrl(String url)
	{
		this.url = url;
	}

	public LinkType getLinkType()
	{
		return linkType;
	}

	public void setLinkType(LinkType linkType)
	{
		this.linkType = linkType;
	}
	
	
	
	private String description;
	@Id
	private String url;
	private LinkType linkType;
	
	public enum LinkType
	{
		NEWS,SHOPPING,HEBREW,OTHER;
	}

	/**
	 * Constructs a <code>String</code> with all attributes
	 * in name = value format.
	 *
	 * @return a <code>String</code> representation 
	 * of this object.
	 */
	public String toString()
	{
	    final String TAB = "  ";
	    
	    String retValue = "";
	    
	    retValue = "Link ( "
	        + super.toString() + TAB
	        + "description = " + this.description + TAB
	        + "url = " + this.url + TAB
	        + "linkType = " + this.linkType + TAB
	        + " )";
	
	    return retValue;
	}
}
